Learn R Programming

TPXG (version 1.0)

Random Numbers from the TPPGX Distribution: Random Numbers from the TPPGX Distribution

Description

Generates random numbers form the Two Parameter Poisson Xgamma distribution.

Usage

rtppxg(n, alpha = 1, theta = 1)

Value

A numeric vector of size n containing random values from the TPPXG distribution.

Arguments

n

An integer indicating the desired sample size.

alpha

A positive real number.

theta

A positive real number.

Author

Nikolaos Kontemeniotis.

R implementation and documentation: Nikolaos Kontemeniotis kontemeniotisn@gmail.com and Michail Tsagris mtsagris@uoc.gr.

Details

In order to obtain random numbers from the TPPXG distribution this function works in two parts. First it generates n random \(\lambda\) values where \(\lambda|\alpha,\theta \sim \text{TPXG}(\alpha,\theta)\). Given this, it generates n numbers X where \(X|\lambda \sim \text{Poisson}(\lambda)\).

References

"Wani, M. A., Ahmad, P. B., Para, B. A. and Elah, N. (2023). A new regression model for count data with applications to health care data. International Journal of Data Science and Analytics."

See Also

dtppxg,qtppxg,ptppxg

Examples

Run this code
x <- rtppxg(100)

Run the code above in your browser using DataLab